home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / tjgold.zip / INSTALL.003 / DEMMEN2.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-29  |  3KB  |  92 lines

  1. {--------------------------------------------------------------------------}
  2. {                Product: TechnoJock's Turbo Toolkit GOLD                  }
  3. {                                                                          }
  4. {                     TTT GOLD - DEMO PROGRAM                        }
  5. {                                                                          }
  6. {                Copyright 1986-1995  TechnoJock Software, Inc.            }
  7. {                           All Rights Reserved                            }
  8. {                          Restricted by License                           }
  9. {--------------------------------------------------------------------------}
  10.  
  11. {Description: DemMen2.PAS
  12.               Shows how to customize the colors in a pop-up menu.
  13. }
  14.  
  15. program DEMMEN2;
  16.  
  17. uses CRT, DOS, GoldFast, GoldMenu, GoldAttr, GoldTint,
  18.                GoldMisc, GoldKey, GoldWin;
  19.  
  20. var
  21.   MainMenu: MenuRecord;
  22.   Choice,Ecode: integer;
  23.  
  24. procedure SetScreen;
  25. {}
  26. begin
  27.    Clear(WhiteOnBlue,chr(176));
  28.    ClearLine(25,WhiteOnBlue);
  29.    WriteCenter(25,LightgrayOnBlue,' Copyright (c) 1995 TechnoJock Software Inc. ');
  30. end; {SetScreen}
  31.  
  32. procedure SetMenu;
  33. {}
  34. begin
  35.    MenuSet(MainMenu);
  36.    with MainMenu do
  37.    begin
  38.       Heading1     := 'TechnoJock''s Turbo Toolkit';
  39.       Heading2     := 'using Ugly Colors';
  40.       Topic[1]     := 'Unit Descriptions';
  41.       Topic[2]     := '-Unit Demos';
  42.       Topic[3]     := 'Self-Running Demo';
  43.       Topic[4]     := 'How to register';
  44.       Topic[5]     := 'About GOLD';
  45.       Topic[6]     := '';
  46.       Topic[7]     := 'Exit Demo';
  47.       TotalPicks   := 7;
  48.       Boxtype      := 5;
  49.       AddPrefix    := 3;
  50.       PicksPerLine := 1;
  51.       AllowEsc     := false;
  52.    end;
  53. end; { SetMenu }
  54.  
  55. procedure CustomizeColors;
  56. {}
  57. begin
  58.    GoldSetColor(MenuHiHot,YellowOnGreen);
  59.    GoldSetColor(MenuHi,BlackonGreen);
  60.    GoldSetColor(MenuNormHot,YellowOnMagenta);
  61.    GoldSetColor(MenuNorm,WhiteOnMagenta);
  62.    GoldSetColor(MenuOff,LightgrayonMagenta);
  63.    GoldSetColor(MenuBorder,YellowOnMagenta);
  64. end; { CustomizeColors }
  65.  
  66. begin { main }
  67. {$IFOPT D+}
  68.    HeapRecord;
  69. {$ENDIF}
  70.    clrscr;
  71.    SetScreen;
  72.    CustomizeColors; {call before menuSet}
  73.    SetMenu;
  74.    MouseShow(true);
  75.    Choice := 5;
  76.    repeat
  77.       DisplayMenu(MainMenu,false,Choice,ECode);
  78.       case Choice of
  79.          1: PromptOK(' Pretend ','You chose Unit Descriptions');
  80.          2: ;
  81.          3: PromptOK(' Pretend ','You chose Self-Running Demo');
  82.          4: PromptOK(' Pretend ','How to register');
  83.          5: PromptOK(' About ','^Gold||Copyright 1995 TechnoJock Software, Inc.');
  84.       end;
  85.    until Choice = 7;
  86.    MouseShow(false);
  87.    clrscr;
  88. {$IFOPT D+}
  89.    HeapCheck;
  90. {$ENDIF}
  91. end. { DEMMEN2 }
  92.